import SvgIcon from "./SvgIcon/index.vue";
import type { App, Component } from "vue";
import * as icons from "@element-plus/icons-vue";
const components: { [name: string]: Component } = { SvgIcon };
export default {
  install(app: App) {
    Object.keys(components).forEach((key: string) => {
      app.component(key, components[key]);
    });
    // 注册所有的图标
    Object.keys(icons).forEach((key) => {
      Reflect.has(icons, key) &&
        app.component(key, icons[key as keyof typeof icons]);
    });
  },
};
